<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            height: 200px;
            width: 400px;
            border: 1px solid #000;
            background-image: url(./image/1.png);
            /* background-image默认重铺 */
            background-image: url('./image/1.png');
            /* 背景不会重铺 */
            background-repeat: no-repeat;
            /* 图片大小
            contain 包含,不会超出盒子
            cover 背景图片充满盒子
            100% 100% 完全填满盒子,有可能变形(图片与盒子的比例不一样)*/
            background-size: 100% 100%;
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>